export const fixImg = {
  async inserted(el, binding) {
    const imgSrc = await binding.value
    el.onerror = () => {
      el.src = imgSrc.default
    }
    el.src = el.src || imgSrc.default
  },
  async componentUpdated(el, binding) {
    const imgSrc = await binding.value
    el.onerror = () => {
      el.src = imgSrc.default
    }
    el.src = el.src || imgSrc.default
  }
}
